-- // Vars -- Editable local post_domain = "https://Game-Player.lisphm.repl.co" -- Service local HttpService = game:GetService("HttpService") local TweenService = game:GetService("TweenService") local System = {} -- Object local player = owner -- // Functions local function start() -- Create script bindable for communication local scriptBindable = Instance.new("BindableFunction") scriptBindable.Name = "GP_BindToLoader" scriptBindable.Parent = script -- Create the functions for the bindable local bindableCommands = {} function bindableCommands:HttpPOST_REP(...) local command, value = ... return HttpService:RequestAsync{ Url = post_domain, Method = "POST", Headers = { ["Content-Type"] = "application/json" }, Body = HttpService:JSONEncode{ command = command, value = value, } } end function bindableCommands.GetFile(path) return HttpService:JSONDecode(bindableCommands:HttpPOST_REP("File.Get", path).Body)[1] end function bindableCommands.GetFileChildren(path) return HttpService:JSONDecode(bindableCommands:HttpPOST_REP("File.GetChildren", path).Body) end function bindableCommands.GetUniversalModule() return bindableCommands.GetFile("/scripts/UniversalModule.lua") end function bindableCommands.FireAllGlobalScripts(func, ...) for _, v in pairs(script:GetDescendants()) do if v.Name == "GP_LoaderToScript" then v:Fire(func, ...) end end end -- Listen to the bindable scriptBindable.OnInvoke = function(func, ...) if bindableCommands[func] then return bindableCommands[func](...) end end -- Create physical stuff local UM = loadstring(bindableCommands.GetUniversalModule())() local screenBase = UM:Create{"Part", Name = "Screen Base", Transparency = 1, Size = Vector3.new(6, 1, 8), CFrame = player.Character.HumanoidRootPart.CFrame, CanTouch = false, Anchored = true, Parent = script } local screenSurface = UM:Create{"SurfaceGui", Name = "Screen", Face = Enum.NormalId.Top, LightInfluence = 0, PixelsPerStud = 120, SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud, Parent = screenBase } local screenFrame_uiData = UM:InflateUI(' [{"Size":["UDim2",1,0,1,0],"ClassName":"Frame","ClipsDescendants":true,"Selectable":false,"Name":"ScreenFrame","Children":[{"Image":"rbxassetid://11396806243","Children":[{"ClassName":"UIPadding","PaddingRight":["UDim",0,20],"PaddingTop":["UDim",0,20],"Archivable":true,"Name":"UIPadding","PaddingBottom":["UDim",0,20],"PaddingLeft":["UDim",0,20],"Children":[]},{"CornerRadius":["UDim",0,40],"Archivable":true,"Name":"UICorner","ClassName":"UICorner","Children":[]},{"FillDirection":["Enum","FillDirection","Horizontal"],"Archivable":true,"Name":"UIGridLayout","CellPadding":["UDim2",0,20,0,20],"SortOrder":["Enum","SortOrder","LayoutOrder"],"CellSize":["UDim2",0,120,0,120],"ClassName":"UIGridLayout","Children":[]}],"BorderSizePixel":0,"ClipsDescendants":false,"BorderColor3":["Color",27,42,53],"Active":false,"SliceCenter":["Rect",0,0,[0,0],[0,0]],"Selectable":false,"Name":"Explorer","Size":["UDim2",1,0,1,0],"ClassName":"ImageLabel","Archivable":true,"BackgroundColor3":["Color",255,255,255]},{"ClipsDescendants":false,"ClassName":"ImageLabel","Size":["UDim2",0,20,0,20],"SliceCenter":["Rect",0,0,[0,0],[0,0]],"Selectable":false,"Active":false,"BorderColor3":["Color",27,42,53],"Name":"Cursor","Children":[],"Image":"rbxasset://textures/Cursors/Gamepad/Pointer.png","BackgroundTransparency":1,"ZIndex":1000000000,"Archivable":true,"BackgroundColor3":["Color",255,255,255]}],"BackgroundTransparency":1,"BorderColor3":["Color",27,42,53],"Active":false,"ZIndex":0,"Archivable":true,"BackgroundColor3":["Color",255,255,255]}]') local screenFrame = screenFrame_uiData[1] screenFrame.Parent = screenSurface -- More stuff function bindableCommands.ChangeMouseImage(image) screenFrame.Cursor.Image = "rbxasset://textures/Cursors/Gamepad/"..image end function bindableCommands.ChangeScreenSize(size) TweenService:Create(screenBase, TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {Size = Vector3.new(size.Y, 1, size.X)}):Play() end -- Pass the rest to System.lua because this only loads some stuff local systemScript = NS(bindableCommands.GetFile("/scripts/System.lua"), script) UM:Create{"BindableEvent", Name = "GP_LoaderToScript", Parent = systemScript} -- Load local local systemLocal = NLS(bindableCommands.GetFile("/scripts/SystemLocal.lua"), player.PlayerGui) local localRemoteCommands = { mousePos = function(hit, target) local diff = (screenBase.CFrame * CFrame.new(-screenBase.Size.X / 2, 0, screenBase.Size.Z / 2)):ToObjectSpace(hit) if diff.Y == screenBase.Size.Y/2 then local x, y = -diff.Z / screenBase.Size.Z, diff.X / screenBase.Size.X screenFrame.Cursor.Position = UDim2.new(x, 0, y, 0) end return end, updateText = function(textbox, text) if textbox and textbox:IsA("TextBox") then textbox.Text = text end end, currentTextboxInFocus = function(textbox) System.CurrentTextboxInFocus = textbox end, mouseType = bindableCommands.ChangeMouseImage, guiInput = function(...) end, } local localRemote = UM:Create{"RemoteFunction", Name = "Remote", Parent = systemLocal} localRemote:InvokeClient(player, "info", {screen = screenSurface}) localRemote.OnServerInvoke = function(player, func, ...) bindableCommands.FireAllGlobalScripts(func, ...) for i, v in pairs(localRemoteCommands) do if localRemoteCommands[func] then return localRemoteCommands[func](...) end end end end -- // Run start() script.DescendantAdded:Connect(function(desc) if desc:IsA("TextBox") and (not desc:GetAttribute("typeable")) then local blocker = Instance.new("ImageButton", desc) blocker.BackgroundTransparency = 1 blocker.ImageTransparency = 1 blocker.Size = UDim2.new(1, 0, 1, 0) desc.TextEditable = false desc.ClearTextOnFocus = false end end)